/*
 * socketbase.h
 *
 *  Created on: 2012-7-10
 *      Author: epmm
 */

#ifndef SOCKETBASE_H_
#define SOCKETBASE_H_

#include <vector>
#include <string>
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
using namespace std;



class CSocketBase
{
protected:
	int m_lstSocket;
	string m_strErrinfo;
public:
	CSocketBase();
	virtual ~CSocketBase();

public:
	int CreateSocketAddr(void* addr,int port,int domain = AF_INET,const char* data = NULL);

	bool SetSockTimeOut(int socktype,int val);

	const char* GetErrInfo();
};

#endif /* SOCKETBASE_H_ */
